package cn.assumejson.springframework.beans.context.event;

import cn.assumejson.springframework.beans.context.ApplicationContext;
import cn.assumejson.springframework.beans.context.ApplicationEvent;

/**
 * 普通事件
 *
 * @author Mr. Li
 * @version 1.0
 * @since 1.0 2021/12/1 16:55
 */
public abstract class ApplicationContextEvent extends ApplicationEvent {
    /**
     * Constructs a prototypical Event.
     *
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */
    public ApplicationContextEvent(Object source) {
        super(source);
    }

    /**
     * Get the <code>ApplicationContext</code> that the event was raised for.
     */
    public final ApplicationContext getApplicationContext() {
        return (ApplicationContext) getSource();
    }


}
